<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>定位的特殊性</title>
    <style>
        span {
            /* 行内元素加了固定或绝对定位可以设置高宽了 */
            position: absolute;
            top: 100px;
            width: 100px;
            height: 100px;
            background-color: pink;
        }
        div {
            /* 块级元素加了定位，如果不设置宽高的话就默认内容的宽高。这跟转换行块模式display差不多 但比他好用感觉 */
            position: absolute;
            background-color: skyblue;
        }
    </style>
</head>
<body>
    <span>123</span>
    <div>321</div>
</body>
</html>